<?php
session_start();
$path = 'http://'.$_SERVER['HTTP_HOST'].get_path($_SESSION['url']);
echo $path;
//echo $_SESSION['url'];

function get_path($path) {
  $len = strlen($path);
  $pos = strpos($path,'/uploads/');
  $http_path =  substr($path,$pos,$len);
	  return $http_path;
}	  

?>
